// pages/index/index.js
 var local=require("../../data/local");
Page({
  data: {
      imgUrl: [{
        url:"/images/post/crab.png",
        id:0
      },
      {
        url:"/images/post/bl.png",
        id:1
      },
      {
        url:"/images/post/sls.png",
        id:2
      },    
      ],
      indicatorDots: true,
      autoplay: true,
      interval: 5000,
      duration: 1000,
      postList:[]
    },
    onLoad(){
      var postList=local.postList;
      this.setData({
        postList
      })
    },
    handleClick(event){
        var id= event.currentTarget.dataset.id
      wx.navigateTo({
        url: '/pages/index/index-detail/index-detail?id='+id,
      })
    },
    jump(event){
      var id= event.currentTarget.dataset.id
      wx.navigateTo({
        url: '/pages/index/index-detail/index-detail?id='+id,
      })
    }
})